<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Ace Armor</title>
		<link rel="stylesheet" href="views/css/datatable/demo_page.css" type="text/css" media="screen" title="default" />
		<link rel="stylesheet" href="views/css/datatable/demo_table_jui.css" type="text/css" media="screen" title="default" />
<link rel="stylesheet" href="views/css/smoothness/jquery-ui-1.8.23.custom.css" type="text/css" media="screen" title="default" />
<script type="text/javascript" charset="utf-8" src="views/js/jquery/jquery-ui-1.8.23.custom.min.js"></script>
<script>
$(function() {
	$( "input:submit", ".demo" ).button();
	
});
function newEdit(){
		
		if( $('#idVal').html()=="New"){
			alert($('#idVal').html());
			$('#id').remove();
			}
		
		
		}

</script>

</head>
<body>
<div class="iframe">
<s:actionerror />
<s:form method="post" theme="simple" id="loginPage" action="AddProductRegAction">

<!-- Start: login-holder -->
<div id="login-holder ">

	<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td>
		<div id="faded1" class="demo">
		<s:hidden name="product.id" id="id"></s:hidden>
		<span class="hide_" id="idVal"><s:property value="crudType" ></s:property></span>
		<table class="floatRight center">
			<tr>
				<th valign="middle" align="right">Product name: &nbsp;</th>
				<td><s:textfield id="name" name="product.name"
					cssClass="inp-form" required="true" /></td>

			</tr>
			<tr>
				<th valign="middle" align="right">Product type: &nbsp;</th>
				<td><s:textfield id="type" name="product.type"
					cssClass="inp-form" required="true" /></td>

			</tr>
			<tr>
				<th valign="middle" align="right">Make : &nbsp;</th>
				<td><s:textfield id="make" name="product.make"
					cssClass="inp-form" required="true" /></td>

			</tr>
			<tr>
				<th valign="middle" align="right">Model : &nbsp;</th>
				<td><s:textfield id="model" name="product.model"
					cssClass="inp-form" required="true" /></td>

			</tr>
			<tr>
				<td class="pad50px"><input type="submit" id="submit" class="ui-button ui-widget ui-state-default ui-corner-all" value="Submit" onclick="newEdit();" ></input>
				</td>
			</tr>
		</table>
		</div>
		</td>

	</tr>
</table>

</div>
<!-- End: login-holder -->

</s:form>
</div>
</body>
</html>